package summarizer.newversion;

import java.util.ArrayList;
import java.util.HashMap;

import com.aliasi.util.Pair;

import thesis.InfoUnit;
import thesis.DataObject;
import thesis.Summary;

public abstract class Summarizer {
	protected long executionTime;
	public boolean rndAlgo = false;
	public double opRatio = 0;

	public abstract Summary computeSummary(int summaryDimension,
			int numberOfPages, HashMap<Long, DataObject> tweets, int dimSize);

	public abstract long getExecutionTime();

	public double getTotalC(HashMap<Long, DataObject> tweets,
			ArrayList<InfoUnit> units, double[][] probs) {
		double total = 0;
		for (DataObject t : tweets.values()) {
			for (InfoUnit unit : units) {
				total += probs[t.getInternId()][unit.getInternId()]
						* unit.getWeight();
			}
		}
		return total;
	}
}
